<template>
  <div class="about">
    <h1>This is an about page</h1>
    <h2>{{ $store.state.msg }}</h2>
    <button @click="change">修改msg</button>
  </div>
</template>

<script>
import store from '../store'

export default {
  methods: {
    change(){
      this.$store.commit('setMsg', '欢迎您')
    }
  },
}
</script>